In a control system that includes distributed plural pieces of communication control equipment, time synchronization between the communication control equipment may be required in accordance with an application that realizes the control. In a distributed control system connected to a network, time synchronization is possible by transmission and reception of time synchronization packets via the network.
A time synchronization method using a network includes NTP (NetworkTime Protocol), SNTP (SimpleNetworkTime Protocol), IEEE 1588, etc.
Here, an execution procedure of a time synchronization protocol of IEEE 1588 is explained using FIG. 14 and FIG. 15. IEEE 1588 is applied to master-slave configurations.
FIG. 14 explains the execution procedure of the time synchronization protocol of IEEE 1588. FIG. 15 shows exchange of messages between a master and a slave in IEEE 1588.
First, a master transmits a Sync message to a slave (S060).
At this time, the master records a transmission time t1 of the Sync message (S061).
Upon receiving the Sync message, the slave records a reception time t2 thereof (S062).
The master notifies the transmission time t1 of the Sync message to the slave by use of any of the following methods (S063). In one of the methods, information on the transmission time t1 is placed on the Sync message. In another method, information on the transmission time t1 is placed on a Follow_Up message following the Sync message.
Then, the slave transmits a Delay_Req message to the master (S064).
At this time, the slave records a transmission time t3 of the Delay_Req message (S065).
Upon receiving the Delay_Req message, the master records a reception time t4 thereof (S066).
The master places information on the reception time t4 of the Delay_Req message on a Delay_Resp message and notifies the slave of the reception time t4 (S067).
The slave that has received the Delay_Resp message calculates a communication delay and a time difference between the master and slave from the times t1, t2, t3, and t4 (S068).
The calculation of communication delays is executed on the premise that the forward communication delay and backward communication delay are equal to one another between the master and slave. Therefore, a one-way communication delay td is expressed by Formula (1).td=((t4−t3)+(t2−t1))/2  (1)
A time difference tdiff between the master and slave is expressed by Formula (2).tdiff=((t4−t3)−(t2−t1))/2  (2)
The slave is time-synchronized with the master by use of the tdiff.
When the network includes intermediary equipment such as a network switch, a precision of the time synchronization will decrease. IEEE 1588 is based on the premise that a forward delay and backward delay of a time synchronization packet are equal to one another or that, even when there is a time difference between the delays, the time difference is well known.
When a network is shared by plural pieces of communication control equipment as in a distributed control system, time synchronization packets are queued within intermediary equipment such as a network switch, jitters occur in a time difference between the forward and backward delays. That is, since the forward and backward delays of a time synchronization packet differs from one another and a time difference between the forward and backward delays is unknown, the premise of IEEE 1588 collapses.
In IEEE 1588-2008, “IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems,” a transfer delay of a packet within a network device can be measured by use of an end-to-end TC (Transparent Clock) or peer-to-peer TC. By reflecting this measured transfer delay in data in the packet, it is possible to calculate a difference between the forward and backward communication delays. However, to use these methods, a network device corresponding to the end-to-end TC or peer-to-peer TC may be required. Such a network device is high in cost and does not become widespread comparing to general network devices, so they are difficult to obtain, and thus difficult to use.
In JP-A No. 2010-74600, plural delay estimation packets are transmitted at a predetermined transmission interval, reception intervals and predetermined transmission intervals are compared to estimate a queuing delay in a network device. However, in this method, since a time synchronization protocol is executed in both a master and a slave, communication control equipment compliant with a standard cannot be used in both the master and slave. Therefore, it is difficult to configure a system using communication control equipment compliant with the standard. Additionally, since a delay estimation packet is transmitted, an amount of transmission and reception of packets other than time synchronization packets are small. Accordingly, an amount of information transmitted and received in the system is small.
It is desirable to provide communication control equipment that is useful for a network configuration using general network intermediary equipment and that is able to time synchronize with other communication control equipment connected by a network without reducing an amount of information transmitted and received in a system.